import java.util.PriorityQueue;
class Student implements Comparable<Student> {
    public int age;
    public String name;

    public Student(int age, String name) {
        this.age = age;
        this.name = name;
    }

    @Override
    //小根堆
    public int compareTo(Student o) {
        return this.age-o.age;
    }

}
public class Test {
    public static void main(String[] args) {
        PriorityQueue<Student> priorityQueue = new PriorityQueue<>();
        priorityQueue.offer(new Student(10,"aaaa"));
        priorityQueue.offer(new Student(12,"bbbb"));
    }
}